using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WinForm
{
    public partial class FormInventoryShow : Form
    {
        #region variable
        public Point FormLocation;
        private int SelectedIndex = -1;
        #endregion


        public FormInventoryShow() : this(new Point(100, 100)) { }
        public FormInventoryShow(Point location)
        {
            InitializeComponent();
            this.FormLocation = location;
            this.DataBind();
        }

        private void FormInventoryShow_Load(object sender, EventArgs e)
        {
            this.Location = this.FormLocation;
            if (this.dataGridView1.Rows.Count != 0)
            {
                this.dataGridView1.Rows[0].Selected = false;
            }
        }

        private void DataBind()
        {
            Graduate.BLL.Inventory.Inventory inventory = new Graduate.BLL.Inventory.Inventory();
            this.dataGridView1.DataSource = inventory.GetList("CurrentNum<=MinNum").Tables[0];
        }
    }
}
